/**
 * 
 */
package demo.demo1.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import demo.demo1.dao.PersonDao;
import demo.demo1.model.Person;
import demo.demo1.service.PersonService;

/**
 * @author nishant.awasthi
 *
 */
@Service
public class PersonServiceImpl implements PersonService{
	
	@Autowired
	private PersonDao personDao;

	/**
	 * @param personDao the personDao to set
	 */
	public void setPersonDao(PersonDao personDao) {
		this.personDao = personDao;
	}

	/**
	 * 
	 */
	public PersonServiceImpl() {
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {

	}

	public List<Person> getPeople() {
		
		return personDao.getPeople();
	}

	public Person save(Person person) {
		return personDao.save(person);
	}

	public Person find(Long id) {
		return personDao.find(id);
	}

}
